package com.sp.scmdb.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.sp.scmdb.common.HibernateObject;

@Entity
@Table(name = "Security_DaySecurity")
public class DaySecurity extends HibernateObject {

	/** 标题 */
	@Column(name = "title")
	private String title;

	/** 内容 */
	@Column(name = "content")
	private String content;

	/** 系统创建日期 */
	@Column(name = "createdDate")
	private Date createdDate;

	/** 创建人 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "creatorId", insertable = false, updatable = false)
	@NotFound(action = NotFoundAction.IGNORE)
	private User user;

	/** 主讲人 */
	@Column(name = "speaker")
	private String speaker;

	/** 讲评日期yyyy-MM-dd */
	@Column(name = "speakerDate")
	private String speakerDate;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getSpeaker() {
		return speaker;
	}

	public void setSpeaker(String speaker) {
		this.speaker = speaker;
	}

	public String getSpeakerDate() {
		return speakerDate;
	}

	public void setSpeakerDate(String speakerDate) {
		this.speakerDate = speakerDate;
	}

	public DaySecurity(String sysId, String title, Date createdDate,
			User user, String speaker, String speakerDate) {
		this.sysId = sysId;
		this.title = title;
		this.createdDate = createdDate;
		this.user = user;
		this.speaker = speaker;
		this.speakerDate = speakerDate;
	}

}
